#include <iostream>
#include <regex>
#include <string>

int main()
{
    std::string str("/numbers/1234");
    std::smatch matches;
    std::regex e("/numbers/(\\d+)");
    bool ret = std::regex_match(str, matches, e);
    if(!ret)
    {
        perror("regex_match error");
    }
    for(const auto& e : matches)
    {
        std::cout << e << std::endl;
    }
    return 0;
}
